package com.atguigu.gmall.all.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author mgx
 * @version 1.0
 * @description: TODO
 * @date 2022-12-02 10:15
 */
@Controller
public class UserController {

    /**
     * 跳转登录页面
     * @param originUrl
     * @return
     */
    @GetMapping("login.html")
    public String login(String originUrl, Model model) {
        // 需要在域中携带原本跳转的路由界面
        model.addAttribute("originUrl", originUrl);
        return "login";
    }
}
